From 43bcc64d9992847e69c9b65c290d5bf6d01f1753 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Fri, 1 Dec 2006 11:54:53 +0000 Subject: [PATCH] [XEN] Quieten down HVM debug output. Signed-off-by: Keir Fraser --- xen/arch/x86/hvm/vlapic.c | 2 +- xen/arch/x86/x86_emulate.c | 40 +++++++++++--------------------------- 2 files changed, 12 insertions(+), 30 deletions(-) diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/arch/x86/hvm/vlapic.c index 60e6171c47..a0304deb37 100644 --- a/xen/arch/x86/hvm/vlapic.c +++ b/xen/arch/x86/hvm/vlapic.c @@ -723,7 +723,7 @@ static void vlapic_write(struct vcpu *v, unsigned long address, break; default: - gdprintk(XENLOG_WARNING, + gdprintk(XENLOG_DEBUG, "Local APIC Write to read-only register 0x%x\n", offset); break; } diff --git a/xen/arch/x86/x86_emulate.c b/xen/arch/x86/x86_emulate.c index 555655f83a..e5f6a6b503 100644 --- a/xen/arch/x86/x86_emulate.c +++ b/xen/arch/x86/x86_emulate.c @@ -7,16 +7,14 @@ */ #ifndef __XEN__ -#include +#include #include #include -#define dprintf(_f, _a...) printf( _f , ## _a ) #else #include #include #include #include -#define dprintf(_f, _a...) gdprintk(XENLOG_WARNING, _f , ## _a ) #undef cmpxchg #endif #include @@ -440,27 +438,6 @@ decode_register( return p; } -static void -dump_instr( - struct x86_emulate_ctxt *ctxt, - struct x86_emulate_ops *ops) -{ -#ifdef __XEN__ - int i; - unsigned long x, eip = ctxt->regs->eip; - - dprintf("Instr:"); - for ( i = 0; i < 16; i++, eip++ ) - { - if ( ops->read(x86_seg_cs, eip, &x, 1, ctxt) != 0 ) - printk(" ??"); - else - printk(" %02x", (uint8_t)x); - } - printk("\n"); -#endif -} - int x86_emulate_memop( struct x86_emulate_ctxt *ctxt, @@ -579,10 +556,7 @@ x86_emulate_memop( modrm_rm = modrm & 0x07; if ( modrm_mod == 3 ) - { - dprintf("Cannot parse ModRM.mod == 3.\n"); goto cannot_emulate; - } if ( ad_bytes == 2 ) { @@ -1206,7 +1180,15 @@ x86_emulate_memop( goto writeback; cannot_emulate: - dprintf("Cannot emulate %02x\n", b); - dump_instr(ctxt, ops); +#ifdef __XEN__ + gdprintk(XENLOG_DEBUG, "Instr:"); + for ( ea_off = ctxt->regs->eip; ea_off < _regs.eip; ea_off++ ) + { + unsigned long x; + ops->read(x86_seg_cs, ea_off, &x, 1, ctxt); + printk(" %02x", (uint8_t)x); + } + printk("\n"); +#endif return -1; } -- 2.30.2